package tuna;

import java.util.Calendar;

public final class Process {	
	public static boolean validate(String day, String us, String role, String id) {
		if (day == null || day.isEmpty() || us == null || us.isEmpty() || 
			role == null || role.isEmpty() || id == null || id.isEmpty()) {
			return false;
		}
		
		Calendar now = Calendar.getInstance();
		int loginDay;
		
		try {
			loginDay = Integer.parseInt(day);
			
			if (now.get(Calendar.DAY_OF_MONTH) != loginDay) {
				return false;
			}
			
			return true;
		} 
		catch (Exception e) {
			e.printStackTrace();
			return false;
		}
	}
}
